<?php
if (isset($_POST['submit'])):
?>

<?php
$year = $_POST['username'];

if ($year %4!=0){
    echo 'khong phai nam nhuan';}
    
    else if ($year %400==0){
        echo 'day la nam nhuan';}
        
        else if ($year %100!=0){
            echo 'khong phai nam nhuan';}
            
            else { echo 'nam nhuan';
            }

?>


<?php
else:
?>

<?php endif; ?>

<form action="tinhNamNhuan.php" method="post">
    
    <table>
        <tr><td> <input type="text" name="username"></td></tr>
        <tr><td><input type="submit" name="submit"></td></tr>
    </table>
</form>